#include <bits/stdc++.h>
using namespace std;
#define int long long
int n,m;
vector<int> v;
bool check(int x)
{
    int z=0,tm=m+1;
    while(z!=n)
    {
        if(x>=v[z+1]-v[z])
        {
            z++;
            continue;
        }
        int y=(v[z+1]-v[z])/x;
        if((v[z+1]-v[z])%x==0)y--;
        if(y<=tm)
        {
            tm-=y;
            z++;
        }
        else
        {
            return 0;
        }
    }
    return 1;
}
void solve()
{
    cin>>n>>m;
    v=vector<int> (n+1);
    int mx=0;
    for(int i=1;i<=n;i++)
    {
        cin>>v[i];
        mx=max(mx,v[i]-v[i-1]);
    }
    int l=1,r=mx,mid;
    while(l<r)
    {
        mid=(r-l)/2+l;
        if(check(mid))r=mid;
        else l=mid+1;
    }
    cout<<l;
}
signed main()
{
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int T=1;
    //cin>>T;
    while(T--)
    {
       solve();
    }
    return 0;
}